<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>PDF Translator</title>
    <link rel="stylesheet" type="text/css" href="../static/css/app.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css">
</head>

<body>
<div>
    <form action="http://localhost:5000/translate" method="post" enctype="multipart/form-data">
        <input type="file" name="file" accept=".pdf" required>
        <label>
            <select name="target_language">
                <option value="" style="color: #D3D3D3;">目标语言</option>
                <option value="Chinese_Simplified">简体中文</option>
                <option value="English">英语</option>
                <option value="Spanish">法语</option>
                <option value="German">德语</option>
                <option value="Japanese">日语</option>
                <option value="Korean">韩语</option>
                <option value="" style="color: #D3D3D3;" disabled>Other Language...</option>
                <!-- More languages here... -->
            </select>
        </label>
        <label>
            <select name="target_format">
                <option value="" style="color: #D3D3D3;">输出格式</option>
                <option value="markdown">Markdown</option>
                <option value="pdf" disabled>PDF</option>
                <option value="" style="color: #D3D3D3;" disabled>Other Format</option>
                <!-- More format here... -->
            </select>
        </label>
        <button type="submit" id="submit-button">
            Translate
        </button>
    </form>

    <div id="loadingAnimation" style="display: none;">
        <span>努力翻译中...</span>
        <div class="loader">
            <div></div>
            <div></div>
            <div></div>
        </div>
    </div>

    <div id="message" class="hide">文件翻译完成!</div>

    <div class="download-button" onClick="handleDownload()">
        <i class="fas fa-download" style="color:white"></i>
        下载翻译文件
    </div>


</div>
</body>

<script src="../static/js/app.js"></script>
</html>